
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
	body {background-color: #45cbff;}
	#c1,span {background-color: #fff;}
	</style>
	<script>
	window.onload = function () {
		var oC = document.getElementById('c1');
		var oGC = oC.getContext('2d');			//绘制环境
	 	/*
			oGC.font = '字体大小  字体'
			oGC.textBaseline = '对齐方式';		//middle、top、bottom。line没有大写
			oGC.fillText(文字, x, y)			//填充
			oGC.strokeText(文字, x, y)			//画线
	 	*/
	 	oGC.font = '60px impact';		//带px
	 	oGC.textBaseline = 'top';		//line不是大写

	 	oGC.fillStyle = 'red';
		oGC.fillText('妙味课堂', 0, 0);

	 	oGC.strokeStyle = '#45cbff';
		oGC.strokeText('妙味课堂', 0, 200)
	}
	</script>
</head>
<body>
	<canvas id="c1" width="500" height="500">
		<span>不支持canvas的浏览器</span>
	</canvas>	<!-- 默认宽300 高150 -->
</body>
</html>